package com.example.demo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;

@Controller
public class BaiduController {


    @PostMapping("/api/face")
    @ResponseBody
    public String baiduFaceIdentify(@RequestBody String data) throws IOException {
        BaiduFace face = new BaiduFace();
        String result = face.getdata(data); // 假设getdata方法接受String类型参数
        return result; // 返回识别结果
    }


}